{% extends 'TopxiaWebBundle:User:layout.html.twig' %}

{% block title %}{{ parent() }}{% endblock %}

{% set pageNav = type %}

{% block main %}

  {% if courses %}
    {{ render(controller('TopxiaWebBundle:Course:coursesBlock', {courses:courses, view: 'list'})) }}
    <nav class="text-center">
      {{ web_macro.paginator(paginator) }}
    </nav> 
  {% else %}
    {% if pageNav == 'teach' %}
      <div class="empty">无在教的课程</div>
    {% elseif pageNav == 'learn' %}
      <div class="empty">无在学的课程</div>
    {% elseif pageNav == 'favorited' %}
      <div class="empty">无收藏的课程</div>
    {% endif %}
  {% endif %}

{% endblock %}

